#ifndef _SERIAL_MULTI_CONTROL_
#define _SERIAL_MULTI_CONTROL_
#include "serial_multi_build.h"
// #include "basis_state.h"
// #include "coupling_coeff.h"
// //#include "trans_coeff.h"
// #include "wavefun_coeff.h"
// //#include "cont_term.h"
// #include "tpe_term.h"
// #include "com_sparse_row.h"
#include <string>
#include <iostream>
#include <fstream>
using std::string;


class Serial_Multi_SL{
  // serial control Save & Load
 public:
   void save(SingleP &SP, string filename){
     std::ofstream ofs(filename);
     // save data to archive
     boost::archive::binary_oarchive oa(ofs);
     // write class instance to archive
     oa << SP;
   }
   void save(DoubleP &DP, string filename){
     std::ofstream ofs(filename);
     // save data to archive
     boost::archive::binary_oarchive oa(ofs);
     // write class instance to archive
     oa << DP;
   }
   void save(TripleP &TP, string filename){
     std::ofstream ofs(filename);
     // save data to archive
     boost::archive::binary_oarchive oa(ofs);
     // write class instance to archive
     oa << TP;
   }
   //~~~~~~~~~~~~~~~~~~~For Multi_Pack save ~~~~~~~~~~~~~~~~~~~~~~~~~//
   void save(Multi_Pack &P, string filename){
     std::ofstream ofs(filename);
     // save data to archive
     boost::archive::binary_oarchive oa(ofs);
     // write class instance to archive
     oa << P;
   }
   void load(SingleP &SP, string filename){
     std::ifstream ifs(filename);
     // save data to archive
     boost::archive::binary_iarchive ia(ifs);
     // write class instance to archive
     ia >> SP;
   }
   //
   //
   void load(DoubleP &DP, string filename){
     std::ifstream ifs(filename);
     // save data to archive
     boost::archive::binary_iarchive ia(ifs);
     // write class instance to archive
     ia >> DP;
   }
   void load(TripleP &TP, string filename){
     std::ifstream ifs(filename);
     // save data to archive
     boost::archive::binary_iarchive ia(ifs);
     // write class instance to archive
     ia >> TP;
   }
   //~~~~~~~~~~~~~~~~~~~For Multi_Pack load ~~~~~~~~~~~~~~~~~~~~~~~~~//
   void load(Multi_Pack &P, string filename){
     std::ifstream ifs(filename);
     // save data to archive
     boost::archive::binary_iarchive ia(ifs);
     // write class instance to archive
     ia >> P;
   }
   //~~~~~~~~~~~~~~~~~~~For Multi_Pack save ~~~~~~~~~~~~~~~~~~~~~~~~~//
   void save(Norm_Ord_Sec &P, string filename){
     std::ofstream ofs(filename);
     // save data to archive
     boost::archive::binary_oarchive oa(ofs);
     // write class instance to archive
     oa << P;
   }
   //~~~~~~~~~~~~~~~~~~~For Multi_Pack load ~~~~~~~~~~~~~~~~~~~~~~~~~//
   void load(Norm_Ord_Sec &P, string filename){
     std::ifstream ifs(filename);
     // save data to archive
     boost::archive::binary_iarchive ia(ifs);
     // write class instance to archive
     ia >> P;
   }


 };

#endif
